<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<link rel="stylesheet" href="./css/estilo2.css" type="text/css" /> 

<link rel="stylesheet" href="./css/style.css" type="text/css" />
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="cabecera.jsp" %>
        <title>Alta prestamo</title>
    </head>
    <body>
        <div class="contenedor">
            <h1>Formulario de creación de un nuevo prestamo</h1>
            <html:form action="/InsertarPrestamoAction" onsubmit="return(validateInsertarPrestamoForm(this));" >
                <html:errors/>
                <html:javascript formName="InsertarPrestamoForm"/>
                <table border="1">
                    <tbody>
                        <tr>
                            <logic:notEmpty name="seleccion">
                                <td>Seleccione una cuenta</td>
                                <td>
                                    <html:select  property="seleccion">
                                        <logic:iterate id="seleccion" name="seleccion">
                                <option name="seleccion" value="<bean:write name='seleccion' property='pkCuenta' />"><bean:write name="seleccion" property="codigoEntidad" />&nbsp;<fmt:formatNumber minIntegerDigits="4" pattern="####"><bean:write name="seleccion" property="codigoSucursal" /></fmt:formatNumber> &nbsp;<fmt:formatNumber minIntegerDigits="2" pattern="##"><bean:write name="seleccion" property="digitoControl" /></fmt:formatNumber>  &nbsp;<fmt:formatNumber minIntegerDigits="10" pattern="##########"><bean:write name="seleccion" property="pkCuenta" /></fmt:formatNumber> </option>
                                </logic:iterate>
                            </html:select>
                        </td>
                    </logic:notEmpty>
                    </tr>
                    <tr>
                        <td>Cantidad</td>
                        <td><html:text property="cantidad" /></td>
                    </tr>
                    <tr>
                        <td>Cantidad pagada</td>
                        <td><html:text property="cantidadPagada" /></td>
                    </tr>
                    <tr>
                        <td>Cuota mensual</td>
                        <td><html:text property="cuotaMensual" /></td>
                    </tr>
                    <tr>
                        <td>Meses a amortizar</td>
                        <td><html:text property="mesesAmortizar" /></td>
                    </tr>
                    <tr>
                        <td colspan="2"><html:submit value="Crear" /></td> 
                    </tr>
                    </tbody>
                </table>
            </html:form>
        </div>
    </body>
</html>
